<template>
    <div>
        <el-steps :active="1000" align-center>
            <el-step :title="flownode.flowNodeName" :description="flownode.flowNodeRemark"
                     v-for="flownode in flownodes" :key="flownode.flowNodeId" ></el-step>
        </el-steps>
    </div>
</template>

<script>

    import Flow_nodeService from '../../../model/mfy/flow/Flow_nodeService.js'
    var flow_nodeService=  Flow_nodeService.getInstance();

    export default {
        props:['flowId'],
        name: "FlowChart",
        data(){
            return{
                flowId2:this.flowId,
                flownodes:[],
            }
        },
        methods:{
            getListByFlowId(){
                flow_nodeService.getListByFlowId(this.flowId2).then(response=>{
                    this.flownodes = response.data.data
                })
            }
        },
        created(){
        this.getListByFlowId();
        },
        watch:{
            flowId:function () {
                this.flowId2=this.flowId;
                this.getListByFlowId();
            }
        }
    }
</script>

<style scoped>

</style>